<nz-drawer [nzClosable]="false" [nzVisible]="visible" nzPlacement="right" nzWidth="500px" nzTitle="设备巡检计划"
           [nzFooter]="footerTpl"
           (nzOnClose)="close()">

  <nz-spin [nzSpinning]="nzLoading">
    <form nz-form nzLayout="vertical" [formGroup]="validateForm" (ngSubmit)="submitForm()">

      <nz-form-item>
        <nz-form-label nzFor="code"> 编号</nz-form-label>
        <nz-form-control nzErrorTip="Please input code!">
          <input nz-input id="code" formControlName="code" [readOnly]="isUpdate" nzSize="small" />
        </nz-form-control>
      </nz-form-item>

      <nz-form-item>
        <nz-form-label nzFor="name"> 描述</nz-form-label>
        <nz-form-control nzErrorTip="Please input name!">
          <input nz-input id="name" formControlName="name" nzSize="small" />
        </nz-form-control>
      </nz-form-item>

      <nz-form-item>
        <nz-form-label nzFor="idx"> 排序号</nz-form-label>
        <nz-form-control nzErrorTip="Please input name!">
          <nz-input-number id="idx" formControlName="idx" nzSize="small" ></nz-input-number>
        </nz-form-control>
      </nz-form-item>

    </form>
  </nz-spin>

  <ng-template #footerTpl>
    <div style="float: right">
      <button nz-button style="margin-right: 8px;" (click)="close()">取消</button>
      <button nz-button nzType="primary" (click)="submitForm()">保存</button>
    </div>
  </ng-template>
</nz-drawer>
